<template>
    <view class="plate" :style="{ '--color': color }" v-if="pageData">
        <titleBox title="分享人"></titleBox>
        <view class="Wrapper">
            <image :src="$imgUrls(pageData.v_headimg)" mode="aspectFill" class="headImg"></image>
            <view class="flex-1 d-flex f-column a-start">
                <text class="ellipsis black size30">{{ pageData.v_name }}</text>
                <text class="color_33 size26 m-top4">{{ pageData.v_tel }}</text>
                <view class="grade" v-if="pageData.vip_name">{{ pageData.vip_name }}</view>
            </view>
        </view>
    </view>
</template>

<script>
    import { mapState } from 'vuex';
    import titleBox from '@/subCard/components/titleBox.vue';
    export default {
        props: ['pageData'],
        components: {
            titleBox
        },
        data() {
            return {
                headImg: 'https://imgcdn.mogoie.com/6099/1709797684310.JPG'
            };
        },
        methods: {},
        computed: {
            ...mapState(['color'])
        }
    };
</script>

<style lang="scss" scoped>
    .plate {
        width: 690rpx;
        margin: 0 auto 24rpx;
        background-color: #ffffff;
        padding: 20rpx;
        border-radius: 10rpx;
    }

    .Wrapper {
        width: 100%;
        display: flex;
        align-items: center;
        padding: 30rpx;

        .headImg {
            width: 100rpx;
            height: 100rpx;
            border-radius: 10rpx;
            margin-right: 24rpx;
        }

        .grade {
            padding: 0 8rpx;
            border: 1rpx solid var(--color);
            font-size: 22rpx;
            color: var(--color);
            border-radius: 10rpx;
            margin-top: 4rpx;
        }
    }
</style>
